/*
 *接口编写处...
*如果接口需要做Action的权限验证，请在Action上使用属性
*如: [ApiActionPermission("tb_project_fundingtemplatesource_relation",Enums.ActionPermissionOptions.Search)]
 */
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Http;
using MYData.System.IServices;

namespace MYData.System.Controllers
{
    public partial class tb_project_fundingtemplatesource_relationController
    {
        private readonly Itb_project_fundingtemplatesource_relationService _service;//访问业务代码
        private readonly IHttpContextAccessor _httpContextAccessor;

        [ActivatorUtilitiesConstructor]
        public tb_project_fundingtemplatesource_relationController(
            Itb_project_fundingtemplatesource_relationService service,
            IHttpContextAccessor httpContextAccessor
        )
        : base(service)
        {
            _service = service;
            _httpContextAccessor = httpContextAccessor;
        }
        /// <summary>
        ///根据项目来源单位查询出项目来源单位对应的项目模板
        /// </summary>
        /// <param name="SourceId"></param>
        /// <returns></returns>
        [HttpGet,Route("GetProjectFundingTemplateBySourcePartAsync")]
        public async Task<IActionResult> GetProjectFundingTemplateBySourcePartAsync(string SourceId)
        {
            return Json(_service.GetProjectFundingTemplateBySourcePartAsync(SourceId));
        }
    }
}
